package com.example.demo.service;

import com.example.demo.entity.finance;
import com.example.demo.entity.fin;
import com.example.demo.mapper.finmapper;
import com.example.demo.mapper.financemapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class financeservice implements financeserviceInter {
    @Autowired
    financemapper financedao;

    @Autowired
    finmapper findao;

    public PageInfo<finance> searchfinance(Integer pagenum, Integer pagesize, finance f) {
        PageHelper.startPage(pagenum, pagesize);
        List<finance> list = financedao.searchfinance(f);
        PageInfo<finance> pageinfo = new PageInfo<>(list);

        return pageinfo;
    }

    public int signdel(finance f) {
        return financedao.signdel(f);
    }
    public int unsigndel(finance f) {
        return financedao.unsigndel(f);
    }

    public List<finance> sumprice(finance f) {
        return financedao.sumprice(f);
    }

    public int insertfinance(fin f) {
        return findao.insertfinance(f);
    }

    public int signverify(finance f) {
        return financedao.signverify(f);
    }
}
